package c.c.a;

import android.content.Context;

public class x1 extends q1 {
    public static final long[] i = new long[]{60000};
    public final g2 d;
    public final u e;
    public final c f;
    public long g;
    public long h;

    public x1(Context context, u uVar, g2 g2Var, c cVar) {
        super(context);
        this.e = uVar;
        this.d = g2Var;
        this.f = cVar;
    }

    public boolean a() {
        return true;
    }

    public long b() {
        long j = this.d.e.getLong("batch_event_interval", 30000);
        if (j > 60000 || j <= 0) {
            j = 60000;
        }
        i[0] = j;
        return this.g + j;
    }

    public long[] c() {
        return i;
    }

    /*  JADX ERROR: JadxRuntimeException in pass: SSATransform
        jadx.core.utils.exceptions.JadxRuntimeException: Not initialized variable reg: 12, insn: 0x00e4: MOVE  (r5 ?[OBJECT, ARRAY]) = (r12 ?[OBJECT, ARRAY]), block:B:55:0x00da
        	at jadx.core.dex.visitors.ssa.SSATransform.renameVarsInBlock(SSATransform.java:157)
        	at jadx.core.dex.visitors.ssa.SSATransform.renameVariables(SSATransform.java:129)
        	at jadx.core.dex.visitors.ssa.SSATransform.process(SSATransform.java:51)
        	at jadx.core.dex.visitors.ssa.SSATransform.visit(SSATransform.java:41)
        	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27)
        	at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)
        	at java.util.ArrayList.forEach(Unknown Source)
        	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)
        	at jadx.core.ProcessClass.process(ProcessClass.java:32)
        	at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51)
        	at java.lang.Iterable.forEach(Unknown Source)
        	at jadx.core.ProcessClass.processDependencies(ProcessClass.java:51)
        	at jadx.core.ProcessClass.process(ProcessClass.java:37)
        	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
        	at jadx.api.JavaClass.decompile(JavaClass.java:62)
        	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
        */
    public boolean d() {
        /*
        r26 = this;
        r1 = r26;
        r2 = java.lang.System.currentTimeMillis();
        r4 = r1.h;
        r0 = r1.d;
        r0 = r0.e;
        r6 = "batch_event_interval";
        r7 = 30000; // 0x7530 float:4.2039E-41 double:1.4822E-319;
        r6 = r0.getLong(r6, r7);
        r6 = r6 + r4;
        r4 = 1;
        r0 = 0;
        r5 = (r2 > r6 ? 1 : (r2 == r6 ? 0 : -1));
        if (r5 <= 0) goto L_0x0204;
        r2 = r1.f;
        r2 = r2.c();
        r3 = c.c.a.s1.d();
        if (r3 == 0) goto L_0x0204;
        if (r2 == 0) goto L_0x0204;
        monitor-enter(r3);
        r15 = r3.m;	 Catch:{ all -> 0x0200 }
        monitor-exit(r3);
        if (r15 == 0) goto L_0x0204;
        r14 = r1.e;
        r3 = r3.i;
        java.util.Objects.requireNonNull(r14);
        r5 = c.c.a.u.e;
        r6 = "eventv3";
        r6 = r5.get(r6);
        r6 = (c.c.a.x) r6;
        r7 = "event";
        r7 = r5.get(r7);
        r7 = (c.c.a.v) r7;
        r8 = "event_misc";
        r8 = r5.get(r8);
        r8 = (c.c.a.w) r8;
        r13 = "pack";
        r5 = r5.get(r13);
        r12 = r5;
        r12 = (c.c.a.z) r12;
        r11 = new android.content.ContentValues;
        r11.<init>();
        r5 = r14.c;	 Catch:{ Exception -> 0x01dc, all -> 0x01d8 }
        r10 = r5.getWritableDatabase();	 Catch:{ Exception -> 0x01dc, all -> 0x01d8 }
        r10.beginTransaction();	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r5 = 3;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r9 = new c.c.a.s[r5];	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r9[r0] = r7;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r9[r4] = r6;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r6 = 2;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r9[r6] = r8;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r8 = new org.json.JSONArray[r5];	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r7 = 0;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r6 = r15.c;	 Catch:{ Exception -> 0x01d4, all -> 0x01d0 }
        r5 = r14;
        r16 = r6;
        r6 = r9;
        r17 = r8;
        r8 = r10;
        r18 = r9;
        r9 = r16;
        r19 = r10;
        r10 = r17;
        r16 = r5.a(r6, r7, r8, r9, r10);	 Catch:{ Exception -> 0x01cc, all -> 0x01c8 }
        r5 = r17[r0];	 Catch:{ Exception -> 0x01cc, all -> 0x01c8 }
        if (r5 == 0) goto L_0x009d;
        r5 = r17[r0];	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        r5 = r5.length();	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        if (r5 > 0) goto L_0x00c7;
        goto L_0x009d;
        r0 = move-exception;
        goto L_0x00b7;
        r0 = move-exception;
        r13 = r19;
        goto L_0x0168;
        r5 = r17[r4];	 Catch:{ Exception -> 0x01cc, all -> 0x01c8 }
        if (r5 == 0) goto L_0x00a9;
        r5 = r17[r4];	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        r5 = r5.length();	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        if (r5 > 0) goto L_0x00c7;
        r5 = 2;
        r6 = r17[r5];	 Catch:{ Exception -> 0x01cc, all -> 0x01c8 }
        if (r6 == 0) goto L_0x00bc;
        r5 = r17[r5];	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        r5 = r5.length();	 Catch:{ Exception -> 0x0098, all -> 0x0096 }
        if (r5 > 0) goto L_0x00c7;
        goto L_0x00bc;
        r2 = r0;
        r10 = r19;
        goto L_0x01f4;
        r5 = r15.l;	 Catch:{ Exception -> 0x01cc, all -> 0x01c8 }
        if (r5 != 0) goto L_0x00c4;
        if (r3 == 0) goto L_0x00c4;
        r5 = 1;
        goto L_0x00c5;
        r5 = 0;
        if (r5 == 0) goto L_0x013d;
        r6 = java.lang.System.currentTimeMillis();	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = r15.l;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        if (r5 != 0) goto L_0x00d3;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        if (r3 == 0) goto L_0x00d3;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = 1;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        goto L_0x00d4;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = 0;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        if (r5 == 0) goto L_0x00d8;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r9 = r15;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        goto L_0x00da;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = 0;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r9 = r5;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r10 = 0;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r20 = 0;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r21 = r17[r0];	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r22 = r17[r4];	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = 2;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r23 = r17[r5];	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5 = r12;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r8 = r2;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r0 = r11;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r11 = r20;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r4 = r12;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r12 = r21;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r24 = r13;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r13 = r22;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r21 = r14;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r14 = r23;	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r5.m(r6, r8, r9, r10, r11, r12, r13, r14);	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r11 = r4.e(r0);	 Catch:{ Exception -> 0x0098, all -> 0x0139 }
        r0 = 0;
        r13 = r19;
        r14 = r24;
        r13.insert(r14, r0, r11);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = c.c.a.m0.b;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        if (r0 == 0) goto L_0x0131;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = r15.l;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        if (r0 != 0) goto L_0x010f;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        if (r3 == 0) goto L_0x010f;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = 1;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        goto L_0x0110;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = 0;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        if (r0 == 0) goto L_0x0131;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0.<init>();	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r5 = "send launch, ";	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0.append(r5);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r5 = r15.c;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0.append(r5);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r5 = ", hadUI:";	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0.append(r5);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0.append(r3);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r0 = r0.toString();	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r3 = 0;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        c.c.a.m0.a(r0, r3);	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r3 = 1;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r15.l = r3;	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        goto L_0x0144;
        r0 = move-exception;
        goto L_0x0165;
        r0 = move-exception;
        goto L_0x0168;
        r0 = move-exception;
        r13 = r19;
        goto L_0x0165;
        r0 = r11;
        r4 = r12;
        r21 = r14;
        r14 = r13;
        r13 = r19;
        r0 = r11;
        r7 = r16;
        r3 = 3;
        if (r7 >= r3) goto L_0x01bc;
        r9 = r15.c;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = r21;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r6 = r18;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r8 = r13;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r10 = r17;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r3 = r5.a(r6, r7, r8, r9, r10);	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = 0;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r6 = r17[r5];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        if (r6 == 0) goto L_0x016b;
        r6 = r17[r5];	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        r5 = r6.length();	 Catch:{ Exception -> 0x0137, all -> 0x0135 }
        if (r5 > 0) goto L_0x0178;
        goto L_0x016b;
        r10 = r13;
        goto L_0x01f3;
        r10 = r13;
        goto L_0x01de;
        r5 = 1;
        r6 = r17[r5];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        if (r6 == 0) goto L_0x01aa;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r6 = r17[r5];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = r6.length();	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        if (r5 <= 0) goto L_0x01aa;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r6 = java.lang.System.currentTimeMillis();	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r9 = 0;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r10 = 0;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r11 = 0;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r16 = 0;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r12 = r17[r16];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = 1;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r19 = r17[r5];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = 2;	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r22 = r17[r5];	 Catch:{ Exception -> 0x01b9, all -> 0x01b6 }
        r5 = r4;
        r8 = r2;
        r25 = r13;
        r13 = r19;
        r19 = r2;
        r2 = r14;
        r14 = r22;
        r5.m(r6, r8, r9, r10, r11, r12, r13, r14);	 Catch:{ Exception -> 0x01a6, all -> 0x01a2 }
        r0 = r4.e(r0);	 Catch:{ Exception -> 0x01a6, all -> 0x01a2 }
        r5 = 0;
        r6 = r25;
        r6.insert(r2, r5, r0);	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x01b0;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r0 = move-exception;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r25;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x01d2;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r0 = move-exception;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r25;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x01d6;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r19 = r2;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r13;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r2 = r14;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r16 = 0;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r14 = r2;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r7 = r3;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r13 = r6;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r2 = r19;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x0147;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r0 = move-exception;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r13;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x01d2;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r0 = move-exception;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r13;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        goto L_0x01d6;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6 = r13;	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6.setTransactionSuccessful();	 Catch:{ Exception -> 0x01c6, all -> 0x01c4 }
        r6.endTransaction();	 Catch:{ Exception -> 0x01e7 }
        goto L_0x01eb;
        r0 = move-exception;
        goto L_0x01d2;
        r0 = move-exception;
        goto L_0x01d6;
        r0 = move-exception;
        r6 = r19;
        goto L_0x01d2;
        r0 = move-exception;
        r6 = r19;
        goto L_0x01d6;
        r0 = move-exception;
        r6 = r10;
        r10 = r6;
        goto L_0x01f3;
        r0 = move-exception;
        r6 = r10;
        r10 = r6;
        goto L_0x01de;
        r0 = move-exception;
        r2 = 0;
        r10 = r2;
        goto L_0x01f3;
        r0 = move-exception;
        r10 = 0;
        c.c.a.m0.b(r0);	 Catch:{ all -> 0x01f2 }
        if (r10 == 0) goto L_0x01eb;
        r10.endTransaction();	 Catch:{ Exception -> 0x01e7 }
        goto L_0x01eb;
        r0 = move-exception;
        c.c.a.m0.b(r0);
        r2 = java.lang.System.currentTimeMillis();
        r1.h = r2;
        goto L_0x0204;
        r0 = move-exception;
        r2 = r0;
        if (r10 == 0) goto L_0x01ff;
        r10.endTransaction();	 Catch:{ Exception -> 0x01fa }
        goto L_0x01ff;
        r0 = move-exception;
        r3 = r0;
        c.c.a.m0.b(r3);
        throw r2;
        r0 = move-exception;
        r2 = r0;
        monitor-exit(r3);
        throw r2;
        r0 = r1.e;
        java.util.Objects.requireNonNull(r0);
        r2 = new java.util.ArrayList;
        r2.<init>();
        r3 = c.c.a.u.e;
        r4 = "pack";
        r3 = r3.get(r4);
        r3 = (c.c.a.z) r3;
        r0 = r0.c;	 Catch:{ all -> 0x023b }
        r0 = r0.getWritableDatabase();	 Catch:{ all -> 0x023b }
        r4 = "SELECT * FROM pack ORDER BY local_time_ms DESC,_full DESC LIMIT 2";	 Catch:{ all -> 0x023b }
        r5 = 0;	 Catch:{ all -> 0x023b }
        r4 = r0.rawQuery(r4, r5);	 Catch:{ all -> 0x023b }
        r0 = r4.moveToNext();	 Catch:{ all -> 0x0239 }
        if (r0 == 0) goto L_0x0243;	 Catch:{ all -> 0x0239 }
        r0 = r3.clone();	 Catch:{ all -> 0x0239 }
        r3 = r0;	 Catch:{ all -> 0x0239 }
        r3 = (c.c.a.z) r3;	 Catch:{ all -> 0x0239 }
        r3.a(r4);	 Catch:{ all -> 0x0239 }
        r2.add(r3);	 Catch:{ all -> 0x0239 }
        goto L_0x0225;
        r0 = move-exception;
        goto L_0x023e;
        r0 = move-exception;
        r3 = 0;
        r4 = r3;
        c.c.a.m0.b(r0);	 Catch:{ all -> 0x056a }
        if (r4 == 0) goto L_0x0246;
        r4.close();
        r0 = "queryPack, ";
        r0 = c.b.a.a.a.g(r0);
        r3 = r2.size();
        r0.append(r3);
        r3 = ", ";
        r0.append(r3);
        r0.append(r2);
        r0 = r0.toString();
        r3 = 0;
        c.c.a.m0.a(r0, r3);
        r3 = new java.util.ArrayList;
        r0 = r2.size();
        r3.<init>(r0);
        r4 = new java.util.ArrayList;
        r0 = r2.size();
        r4.<init>(r0);
        r0 = r1.a;
        r5 = r1.f;
        r5 = r5.a();
        r6 = c.c.a.q.f;
        r6 = r6.getSendHeadersUris();
        r6 = r6.length;
        r7 = new java.lang.String[r6];
        r8 = com.bytedance.embedapplog.AppLog.getEncryptAndCompress();
        if (r8 == 0) goto L_0x028f;
        r8 = "/service/2/app_log/?tt_data=a";
        goto L_0x0291;
        r8 = "/service/2/app_log/?";
        r9 = 0;
        r10 = c.c.a.q.f;
        r10 = r10.getSendHeadersUris();
        r10 = r10.length;
        if (r9 >= r10) goto L_0x02c4;
        r10 = new java.lang.StringBuilder;
        r10.<init>();
        r11 = c.c.a.q.f;
        r11 = r11.getSendHeadersUris();
        r11 = r11[r9];
        r10 = c.b.a.a.a.d(r10, r11, r8);
        r11 = com.bytedance.embedapplog.AppLog.getIAppParam();
        r12 = 1;
        r10 = c.c.a.r.a(r0, r5, r10, r12, r11);
        r7[r9] = r10;
        r10 = r7[r9];
        r11 = c.c.a.q.d;
        r10 = c.c.a.q.c(r10, r11);
        r7[r9] = r10;
        r9 = r9 + 1;
        goto L_0x0292;
        r12 = 1;
        r5 = r2.iterator();
        r0 = r5.hasNext();
        if (r0 == 0) goto L_0x03f5;
        r0 = r5.next();
        r8 = r0;
        r8 = (c.c.a.z) r8;
        r0 = r8.i;
        r9 = r1.d;
        r10 = "server_time";
        r11 = new java.util.HashMap;
        r13 = 2;
        r11.<init>(r13);
        r13 = com.bytedance.embedapplog.AppLog.getEncryptAndCompress();
        r14 = "Content-Type";
        if (r13 == 0) goto L_0x02f0;
        r13 = "application/octet-stream;tt-data=a";
        r11.put(r14, r13);
        goto L_0x02f5;
        r13 = "application/json; charset=utf-8";
        r11.put(r14, r13);
        r13 = 0;
        r14 = 0;
        if (r14 >= r6) goto L_0x0309;
        r13 = r7[r14];
        r13 = c.c.a.q.a(r12, r13, r11, r0);
        r15 = android.text.TextUtils.isEmpty(r13);
        if (r15 != 0) goto L_0x0306;
        goto L_0x0309;
        r14 = r14 + 1;
        goto L_0x02f7;
        r11 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;
        r0 = android.text.TextUtils.isEmpty(r13);	 Catch:{ JSONException -> 0x035d }
        if (r0 != 0) goto L_0x035a;	 Catch:{ JSONException -> 0x035d }
        r12 = new org.json.JSONObject;	 Catch:{ JSONException -> 0x035d }
        r12.<init>(r13);	 Catch:{ JSONException -> 0x035d }
        r0 = "http_code";	 Catch:{ JSONException -> 0x0358 }
        r0 = r12.optInt(r0);	 Catch:{ JSONException -> 0x0358 }
        if (r0 != r11) goto L_0x0355;	 Catch:{ JSONException -> 0x0358 }
        r0 = "ss_app_log";	 Catch:{ JSONException -> 0x0358 }
        r13 = "magic_tag";	 Catch:{ JSONException -> 0x0358 }
        r13 = r12.optString(r13);	 Catch:{ JSONException -> 0x0358 }
        r0 = r0.equals(r13);	 Catch:{ JSONException -> 0x0358 }
        if (r0 == 0) goto L_0x034b;	 Catch:{ JSONException -> 0x0358 }
        r0 = "success";	 Catch:{ JSONException -> 0x0358 }
        r13 = "message";	 Catch:{ JSONException -> 0x0358 }
        r13 = r12.optString(r13);	 Catch:{ JSONException -> 0x0358 }
        r0 = r0.equals(r13);	 Catch:{ JSONException -> 0x0358 }
        if (r0 == 0) goto L_0x0340;	 Catch:{ JSONException -> 0x0358 }
        r0 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;	 Catch:{ JSONException -> 0x0358 }
        r13 = r12;	 Catch:{ JSONException -> 0x0358 }
        r12 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;	 Catch:{ JSONException -> 0x0358 }
        goto L_0x0365;	 Catch:{ JSONException -> 0x0358 }
        r0 = "101";	 Catch:{ JSONException -> 0x0358 }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ JSONException -> 0x0358 }
        r0 = r0.intValue();	 Catch:{ JSONException -> 0x0358 }
        goto L_0x0355;	 Catch:{ JSONException -> 0x0358 }
        r0 = "102";	 Catch:{ JSONException -> 0x0358 }
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ JSONException -> 0x0358 }
        r0 = r0.intValue();	 Catch:{ JSONException -> 0x0358 }
        r13 = r12;
        r12 = r0;
        goto L_0x0365;
        r0 = move-exception;
        goto L_0x035f;
        r0 = 0;
        r12 = r0;
        goto L_0x0362;
        r0 = move-exception;
        r12 = 0;
        c.c.a.m0.b(r0);
        r0 = 0;
        r13 = r12;
        r12 = 0;
        if (r12 != r11) goto L_0x03e5;
        r14 = r13.optLong(r10);	 Catch:{ Exception -> 0x0388 }
        r16 = 0;	 Catch:{ Exception -> 0x0388 }
        r0 = (r14 > r16 ? 1 : (r14 == r16 ? 0 : -1));	 Catch:{ Exception -> 0x0388 }
        if (r0 <= 0) goto L_0x038c;	 Catch:{ Exception -> 0x0388 }
        r0 = new org.json.JSONObject;	 Catch:{ Exception -> 0x0388 }
        r0.<init>();	 Catch:{ Exception -> 0x0388 }
        r0.put(r10, r14);	 Catch:{ Exception -> 0x0388 }
        r10 = java.lang.System.currentTimeMillis();	 Catch:{ Exception -> 0x0388 }
        r14 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;	 Catch:{ Exception -> 0x0388 }
        r10 = r10 / r14;	 Catch:{ Exception -> 0x0388 }
        r14 = "local_time";	 Catch:{ Exception -> 0x0388 }
        r0.put(r14, r10);	 Catch:{ Exception -> 0x0388 }
        c.c.a.q.b = r0;	 Catch:{ Exception -> 0x0388 }
        goto L_0x038c;
        r0 = move-exception;
        c.c.a.m0.b(r0);
        r0 = "blacklist";
        r0 = r13.optJSONObject(r0);
        if (r0 == 0) goto L_0x03e5;
        r10 = "v1";
        r10 = r0.optJSONArray(r10);
        if (r10 == 0) goto L_0x03a1;
        r11 = r10.length();
        goto L_0x03a2;
        r11 = 0;
        r13 = new java.util.HashSet;
        r13.<init>(r11);
        r14 = 0;
        if (r14 >= r11) goto L_0x03bb;
        r15 = 0;
        r15 = r10.optString(r14, r15);
        r16 = android.text.TextUtils.isEmpty(r15);
        if (r16 != 0) goto L_0x03b8;
        r13.add(r15);
        r14 = r14 + 1;
        goto L_0x03a8;
        r10 = "v3";
        r0 = r0.optJSONArray(r10);
        if (r0 == 0) goto L_0x03c8;
        r10 = r0.length();
        goto L_0x03c9;
        r10 = 0;
        r11 = new java.util.HashSet;
        r11.<init>(r10);
        r13 = 0;
        if (r13 >= r10) goto L_0x03e2;
        r14 = 0;
        r14 = r0.optString(r13, r14);
        r15 = android.text.TextUtils.isEmpty(r14);
        if (r15 != 0) goto L_0x03df;
        r11.add(r14);
        r13 = r13 + 1;
        goto L_0x03cf;
        java.util.Objects.requireNonNull(r9);
        r0 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;
        if (r12 != r0) goto L_0x03ed;
        r3.add(r8);
        goto L_0x03f2;
        r8.k = r12;
        r4.add(r8);
        r12 = 1;
        goto L_0x02c9;
        r0 = r3.size();
        if (r0 > 0) goto L_0x0401;
        r0 = r4.size();
        if (r0 <= 0) goto L_0x0525;
        r0 = r1.e;
        java.util.Objects.requireNonNull(r0);
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r6 = "setResult, ";
        r5.append(r6);
        r5.append(r3);
        r6 = ", ";
        r5.append(r6);
        r5.append(r4);
        r5 = r5.toString();
        r6 = 0;
        c.c.a.m0.a(r5, r6);
        r5 = new java.util.HashMap;
        r5.<init>();
        r5 = new java.util.HashMap;
        r5.<init>();
        r6 = new java.util.HashMap;
        r6.<init>();
        r6 = new java.util.HashMap;
        r6.<init>();
        r6 = new java.util.HashMap;
        r6.<init>();
        r6 = r3.size();
        if (r6 <= 0) goto L_0x0463;
        r6 = 0;
        r7 = r3.size();
        if (r6 >= r7) goto L_0x0463;
        r7 = r3.get(r6);
        r7 = (c.c.a.z) r7;
        r7 = r7.j;
        if (r7 != 0) goto L_0x045a;
        r7 = r3.get(r6);
        r7 = (c.c.a.z) r7;
        goto L_0x0460;
        r7 = r3.get(r6);
        r7 = (c.c.a.z) r7;
        r6 = r6 + 1;
        goto L_0x0443;
        r6 = r4.iterator();
        r7 = r6.hasNext();
        if (r7 == 0) goto L_0x04a4;
        r7 = r6.next();
        r7 = (c.c.a.z) r7;
        r8 = r7.j;
        if (r8 != 0) goto L_0x0494;
        r8 = r7.k;
        r8 = java.lang.Integer.valueOf(r8);
        r8 = r5.get(r8);
        r8 = (java.util.HashMap) r8;
        if (r8 != 0) goto L_0x0467;
        r8 = new java.util.HashMap;
        r8.<init>();
        r7 = r7.k;
        r7 = java.lang.Integer.valueOf(r7);
        r5.put(r7, r8);
        goto L_0x0467;
        r8 = r8 + 1;
        r8 = (long) r8;
        r10 = 5;
        r12 = (r8 > r10 ? 1 : (r8 == r10 ? 0 : -1));
        if (r12 <= 0) goto L_0x0467;
        r3.add(r7);
        r6.remove();
        goto L_0x0467;
        r0 = r0.c;	 Catch:{ all -> 0x0514 }
        r5 = r0.getWritableDatabase();	 Catch:{ all -> 0x0514 }
        r5.beginTransaction();	 Catch:{ all -> 0x0512 }
        r0 = r3.iterator();	 Catch:{ all -> 0x0512 }
        r6 = r0.hasNext();	 Catch:{ all -> 0x0512 }
        if (r6 == 0) goto L_0x04cf;	 Catch:{ all -> 0x0512 }
        r6 = r0.next();	 Catch:{ all -> 0x0512 }
        r6 = (c.c.a.z) r6;	 Catch:{ all -> 0x0512 }
        r7 = "DELETE FROM pack WHERE local_time_ms=?";	 Catch:{ all -> 0x0512 }
        r8 = 1;	 Catch:{ all -> 0x0512 }
        r8 = new java.lang.String[r8];	 Catch:{ all -> 0x0512 }
        r9 = r6.a;	 Catch:{ all -> 0x0512 }
        r6 = java.lang.String.valueOf(r9);	 Catch:{ all -> 0x0512 }
        r9 = 0;	 Catch:{ all -> 0x0512 }
        r8[r9] = r6;	 Catch:{ all -> 0x0512 }
        r5.execSQL(r7, r8);	 Catch:{ all -> 0x0512 }
        goto L_0x04b1;	 Catch:{ all -> 0x0512 }
        r0 = r4.iterator();	 Catch:{ all -> 0x0512 }
        r4 = r0.hasNext();	 Catch:{ all -> 0x0512 }
        if (r4 == 0) goto L_0x050e;	 Catch:{ all -> 0x0512 }
        r4 = r0.next();	 Catch:{ all -> 0x0512 }
        r4 = (c.c.a.z) r4;	 Catch:{ all -> 0x0512 }
        r6 = r4.a;	 Catch:{ all -> 0x0512 }
        r8 = r4.j;	 Catch:{ all -> 0x0512 }
        r8 = r8 + 1;	 Catch:{ all -> 0x0512 }
        r4.j = r8;	 Catch:{ all -> 0x0512 }
        r4 = new java.lang.StringBuilder;	 Catch:{ all -> 0x0512 }
        r4.<init>();	 Catch:{ all -> 0x0512 }
        r9 = "UPDATE pack SET _fail=";	 Catch:{ all -> 0x0512 }
        r4.append(r9);	 Catch:{ all -> 0x0512 }
        r4.append(r8);	 Catch:{ all -> 0x0512 }
        r8 = " WHERE ";	 Catch:{ all -> 0x0512 }
        r4.append(r8);	 Catch:{ all -> 0x0512 }
        r8 = "local_time_ms";	 Catch:{ all -> 0x0512 }
        r4.append(r8);	 Catch:{ all -> 0x0512 }
        r8 = "=";	 Catch:{ all -> 0x0512 }
        r4.append(r8);	 Catch:{ all -> 0x0512 }
        r4.append(r6);	 Catch:{ all -> 0x0512 }
        r4 = r4.toString();	 Catch:{ all -> 0x0512 }
        r5.execSQL(r4);	 Catch:{ all -> 0x0512 }
        goto L_0x04d3;	 Catch:{ all -> 0x0512 }
        r5.setTransactionSuccessful();	 Catch:{ all -> 0x0512 }
        goto L_0x051c;
        r0 = move-exception;
        goto L_0x0517;
        r0 = move-exception;
        r4 = 0;
        r5 = r4;
        c.c.a.m0.b(r0);	 Catch:{ all -> 0x055c }
        if (r5 == 0) goto L_0x0525;
        r5.endTransaction();	 Catch:{ Exception -> 0x0520 }
        goto L_0x0525;
        r0 = move-exception;
        r4 = r0;
        c.c.a.m0.b(r4);
        r0 = "s";
        r0 = c.b.a.a.a.g(r0);
        r4 = r3.size();
        r0.append(r4);
        r4 = " ";
        r0.append(r4);
        r4 = r2.size();
        r0.append(r4);
        r0 = r0.toString();
        r4 = "TeaLog";
        r5 = 0;
        android.util.Log.i(r4, r0, r5);
        r0 = r3.size();
        r2 = r2.size();
        if (r0 != r2) goto L_0x055a;
        r2 = java.lang.System.currentTimeMillis();
        r1.g = r2;
        r0 = 1;
        return r0;
        r0 = 0;
        return r0;
        r0 = move-exception;
        r2 = r0;
        if (r5 == 0) goto L_0x0569;
        r5.endTransaction();	 Catch:{ Exception -> 0x0564 }
        goto L_0x0569;
        r0 = move-exception;
        r3 = r0;
        c.c.a.m0.b(r3);
        throw r2;
        r0 = move-exception;
        r2 = r0;
        if (r4 == 0) goto L_0x0571;
        r4.close();
        throw r2;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.a.x1.d():boolean");
    }

    public String e() {
        return "s";
    }
}
